using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._CartographyTools._CartographicRefinement
{
    /// <summary>
    /// <para>Disperse Markers</para>
    /// <para>Finds point symbols that overlap or are too close to one another based on symbology at reference scale, and spreads them apart based on a minimum spacing and dispersal pattern.</para>
    /// <para>根据参考比例下的符号系统查找彼此重叠或太近的点符号，并根据最小间距和分散模式将它们分开。</para>
    /// </summary>    
    [DisplayName("Disperse Markers")]
    public class DisperseMarkers : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public DisperseMarkers()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_point_features">
        /// <para>Input Point Features</para>
        /// <para>The input point feature layer to be dispersed.</para>
        /// <para>要分散的输入点要素图层。</para>
        /// </param>
        /// <param name="_minimum_spacing">
        /// <para>Minimum Spacing</para>
        /// <para>The minimum separation distance between individual point symbols in page units. A distance must be specified and must be greater than or equal to zero. When a positive value is specified, markers will be separated by that value; when a value of zero is specified, point symbols will touch. The default page unit is Points.</para>
        /// <para>各个点符号之间的最小间隔距离（以页面为单位）。必须指定距离，并且必须大于或等于零。当指定正值时，标记将被该值分隔;当指定值为零时，点符号将触及。默认页面单位为点数。</para>
        /// </param>
        public DisperseMarkers(object _in_point_features, string? _minimum_spacing)
        {
            this._in_point_features = _in_point_features;
            this._minimum_spacing = _minimum_spacing;
        }
        public override string ToolboxName => "Cartography Tools";

        public override string ToolName => "Disperse Markers";

        public override string CallName => "cartography.DisperseMarkers";

        public override List<string> AcceptEnvironments => ["cartographicCoordinateSystem", "referenceScale"];

        public override object[] ParameterInfo => [_in_point_features, _minimum_spacing, _dispersal_pattern.GetGPValue(), _out_representations];

        /// <summary>
        /// <para>Input Point Features</para>
        /// <para>The input point feature layer to be dispersed.</para>
        /// <para>要分散的输入点要素图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Point Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_point_features { get; set; }


        /// <summary>
        /// <para>Minimum Spacing</para>
        /// <para>The minimum separation distance between individual point symbols in page units. A distance must be specified and must be greater than or equal to zero. When a positive value is specified, markers will be separated by that value; when a value of zero is specified, point symbols will touch. The default page unit is Points.</para>
        /// <para>各个点符号之间的最小间隔距离（以页面为单位）。必须指定距离，并且必须大于或等于零。当指定正值时，标记将被该值分隔;当指定值为零时，点符号将触及。默认页面单位为点数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Minimum Spacing")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public string? _minimum_spacing { get; set; }


        /// <summary>
        /// <para>Dispersal Pattern</para>
        /// <para><xdoc>
        ///   <para>Specifies the pattern in which the dispersed point symbols are placed. A group of point symbols will have a center of mass derived from the locations of all points in the group. The center of mass is used as the anchor point around which the dispersal pattern operates.</para>
        ///   <bulletList>
        ///     <bullet_item>Expanded—The general pattern of the point symbols will be maintained as they are spread apart. Points that were exactly coincident are dispersed to a circle around their center of mass. This is the default.</bullet_item><para/>
        ///     <bullet_item>Random—Point symbols are placed around the center of mass in a random dispersal that respects the minimum spacing.</bullet_item><para/>
        ///     <bullet_item>Squares—Point symbols are placed in multiple square rings around the center of mass, ensuring that all points are placed as closely together as allowable by the minimum spacing parameter.</bullet_item><para/>
        ///     <bullet_item>Rings—Point symbols are placed in multiple circular rings around the center of mass, ensuring that all points are placed as closely together as allowable by the minimum spacing parameter.</bullet_item><para/>
        ///     <bullet_item>Square—Point symbols are placed evenly around the center of mass in a single square pattern.</bullet_item><para/>
        ///     <bullet_item>Ring—Point symbols are placed evenly around the center of mass in a single circular pattern.</bullet_item><para/>
        ///     <bullet_item>Cross—Point symbols are spaced evenly on horizontal and vertical axes originating from the center of mass.</bullet_item><para/>
        ///     <bullet_item>X-cross—Point symbols are spaced evenly on 45° axes originating from the center of mass.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定放置分散点符号的模式。一组点符号将具有从组中所有点的位置派生的质心。质心用作分散模式运行的锚点。</para>
        ///   <bulletList>
        ///     <bullet_item>展开 - 点符号的一般模式在分散时将保持不变。完全重合的点分散到围绕其质心的圆圈中。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>随机 - 点符号以随机分散的方式放置在质心周围，并遵循最小间距。</bullet_item><para/>
        ///     <bullet_item>正方形 - 点符号放置在围绕质心的多个正方形环中，确保所有点在最小间距参数允许的范围内尽可能紧密地放置在一起。</bullet_item><para/>
        ///     <bullet_item>环 - 点符号放置在围绕质心的多个圆形环中，确保所有点在最小间距参数允许的范围内尽可能紧密地放置在一起。</bullet_item><para/>
        ///     <bullet_item>正方形 （Square） - 点符号以单个正方形图案均匀地放置在质心周围。</bullet_item><para/>
        ///     <bullet_item>环 （Ring） - 点符号以单个圆形图案均匀地放置在质心周围。</bullet_item><para/>
        ///     <bullet_item>十字 - 点符号在从质心开始的水平轴和垂直轴上均匀分布。</bullet_item><para/>
        ///     <bullet_item>X 十字 - 点符号在从质心开始的 45° 轴上均匀分布。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Dispersal Pattern")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _dispersal_pattern_value _dispersal_pattern { get; set; } = _dispersal_pattern_value._EXPANDED;

        public enum _dispersal_pattern_value
        {
            /// <summary>
            /// <para>Expanded</para>
            /// <para>Expanded—The general pattern of the point symbols will be maintained as they are spread apart. Points that were exactly coincident are dispersed to a circle around their center of mass. This is the default.</para>
            /// <para>展开 - 点符号的一般模式在分散时将保持不变。完全重合的点分散到围绕其质心的圆圈中。这是默认设置。</para>
            /// </summary>
            [Description("Expanded")]
            [GPEnumValue("EXPANDED")]
            _EXPANDED,

            /// <summary>
            /// <para>Random</para>
            /// <para>Random—Point symbols are placed around the center of mass in a random dispersal that respects the minimum spacing.</para>
            /// <para>随机 - 点符号以随机分散的方式放置在质心周围，并遵循最小间距。</para>
            /// </summary>
            [Description("Random")]
            [GPEnumValue("RANDOM")]
            _RANDOM,

            /// <summary>
            /// <para>Squares</para>
            /// <para>Squares—Point symbols are placed in multiple square rings around the center of mass, ensuring that all points are placed as closely together as allowable by the minimum spacing parameter.</para>
            /// <para>正方形 - 点符号放置在围绕质心的多个正方形环中，确保所有点在最小间距参数允许的范围内尽可能紧密地放置在一起。</para>
            /// </summary>
            [Description("Squares")]
            [GPEnumValue("SQUARES")]
            _SQUARES,

            /// <summary>
            /// <para>Rings</para>
            /// <para>Rings—Point symbols are placed in multiple circular rings around the center of mass, ensuring that all points are placed as closely together as allowable by the minimum spacing parameter.</para>
            /// <para>环 - 点符号放置在围绕质心的多个圆形环中，确保所有点在最小间距参数允许的范围内尽可能紧密地放置在一起。</para>
            /// </summary>
            [Description("Rings")]
            [GPEnumValue("RINGS")]
            _RINGS,

            /// <summary>
            /// <para>Square</para>
            /// <para>Squares—Point symbols are placed in multiple square rings around the center of mass, ensuring that all points are placed as closely together as allowable by the minimum spacing parameter.</para>
            /// <para>正方形 - 点符号放置在围绕质心的多个正方形环中，确保所有点在最小间距参数允许的范围内尽可能紧密地放置在一起。</para>
            /// </summary>
            [Description("Square")]
            [GPEnumValue("SQUARE")]
            _SQUARE,

            /// <summary>
            /// <para>Ring</para>
            /// <para>Rings—Point symbols are placed in multiple circular rings around the center of mass, ensuring that all points are placed as closely together as allowable by the minimum spacing parameter.</para>
            /// <para>环 - 点符号放置在围绕质心的多个圆形环中，确保所有点在最小间距参数允许的范围内尽可能紧密地放置在一起。</para>
            /// </summary>
            [Description("Ring")]
            [GPEnumValue("RING")]
            _RING,

            /// <summary>
            /// <para>Cross</para>
            /// <para>Cross—Point symbols are spaced evenly on horizontal and vertical axes originating from the center of mass.</para>
            /// <para>十字 - 点符号在从质心开始的水平轴和垂直轴上均匀分布。</para>
            /// </summary>
            [Description("Cross")]
            [GPEnumValue("CROSS")]
            _CROSS,

            /// <summary>
            /// <para>X-cross</para>
            /// <para>X-cross—Point symbols are spaced evenly on 45° axes originating from the center of mass.</para>
            /// <para>X 十字 - 点符号在从质心开始的 45° 轴上均匀分布。</para>
            /// </summary>
            [Description("X-cross")]
            [GPEnumValue("X_CROSS")]
            _X_CROSS,

        }

        /// <summary>
        /// <para>Updated Input Features</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_representations { get; set; }


        public DisperseMarkers SetEnv(object cartographicCoordinateSystem = null, object referenceScale = null)
        {
            base.SetEnv(cartographicCoordinateSystem: cartographicCoordinateSystem, referenceScale: referenceScale);
            return this;
        }

    }

}